{include admin.inc.header}

{include admin.inc.top}

<div class="container-fluid content-body">
	<div class="main">
		{include admin.inc.menu}

		<section class="right-section" id="right-section">
			<!-- start of inner-frame -->
			<div class="inner-iframe">
				<ul class="breadcrumb">
					<li>
						<i class="glyphicon glyphicon-home"></i>
						<span>当前位置：</span>
						<a href="#">{$breadcrumb[0]}</a>
						<i class="glyphicon glyphicon-chevron-right"></i>
						<a href="#">{$breadcrumb[1]}</a>
					</li>
				</ul>

				<!-- Nav tabs -->
				<ul class="nav nav-tabs">
					<li class="active"><a href="{$add_url}"><i class="glyphicon glyphicon-plus"></i> 添加管理员角色</a></li>
					<li><a href="{$index_url}"><i class="glyphicon glyphicon-th-list"></i> 管理员角色列表</a></li>
					<li><a href="javascript:void(0);"><i class="glyphicon glyphicon-edit"></i> 编辑管理员角色</a></li>
				</ul>

				<div class="inner-container">

					<form role="form" class="content-add-form" id="content-add-form" autocomplete="off">
						<div class="form-element">
							<div class="form-group">
								<label><span class="asterisk">*</span> 角色名称</label>
								<input type="text" name="data[name]" class="form-control" maxlength="15" placeholder="角色名称" required />
							</div>
							<p class="help-block"></p>
						</div>

						<div class="form-element">
							<div class="form-group">
								<label>角色描述</label>
								<textarea name="data[summary]" class="form-control" maxlength="100" placeholder="这里输入角色描述"></textarea>
							</div>
							<p class="help-block"></p>
						</div>

						<!-- 权限配置 -->
						<div>
							<p class="bg-text bg-success">权限配置</p>

							<ul class="nav nav-tabs nav-pills" role="tablist" id="permission-tab">
								{loop $operations $value}
								<li role="presentation"><a href="#{$value[module]}" role="tab" data-toggle="tab">{$value[name]}</a></li>
								{/loop}
							</ul>

							<!-- Tab panes -->
							<div class="tab-content">
								{loop $operations $v}
								<div role="tabpanel" class="tab-pane row" id="{$v[module]}" style="padding-top:20px;">
									<div class="col-md-12">
										<label class="icheck-label"><input type="checkbox" class="icheck check-all" /> &nbsp;&nbsp;全选</label>
									</div>
									{loop $v[items] $value}
									<div class="col-md-3 permission-item">
										<label class="icheck-label"><input type="checkbox" class="icheck" name="permissions[{$value[optkey]}]" value="1" /> &nbsp;&nbsp;{$value[name]}</label>
									</div>
									{/loop}

								</div>
								{/loop}
							</div><!-- END 权限配置 -->

						<div class="btn-group btn-group-or">
							<a href="{$insert_url}" class="btn btn-primary" id="submit_btn"
							   proxy='{"method":"post", "location":"{$index_url}"}'>提交保存</a>
							<span class="or">OR</span>
							<button type="reset" class="btn btn-default">重置表单</button>
						</div>
					</form>

				</div>
			</div><!-- end of inner -->

		</section>

	</div>
</div>

{include admin.inc.footer}

<script>
	seajs.use("managerRole", function(exports) {
		exports.init({});
	});
</script>
</body>
</html>
